<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="head.jsp" %>

<table width="991" height="353" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:16px; margin-bottom:26px;">
  <tr>
    <td width="13" valign="top"></td>
    <td width="209" valign="top"><table width="209" height="32" border="0" cellpadding="0" cellspacing="0" bgcolor="#F8F6DD">
      <tr>
        <td width="87" class="ab4" style="padding-left:15px; padding-top:3px;">查看留言</td>
        <td width="13" class="ab4" ><img src="images/imgbyj/line.gif" width="13" height="32" /></td>
        <td width="109" class="r2" style="padding-top:7px;">Feedback </td>
      </tr>
    </table>
        <table width="209" height="28" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td><img src="images/imgbyj/ab2.gif" width="209" height="28" /></td>
          </tr>
        </table>
      <table width="209" height="84" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top" background="images/imgbyj/ab3.gif">



                <table width="171" height="29" border="0" cellpadding="0" cellspacing="0" background="images/imgbyj/abbg.gif" style="margin-bottom:12px;">
                  <tr>
                    <td align="left"><a href="FeedbackView.asp" class="lmenu" style="padding-left:50px; padding-top:4px;">查看留言</a></td>
                  </tr>
                </table>

                <table width="171" height="29" border="0" cellpadding="0" cellspacing="0" background="images/imgbyj/abbg.gif" style="margin-bottom:12px;">
                  <tr>
                    <td align="left"><a href="Feedback.asp" class="lmenu" style="padding-left:50px; padding-top:4px;">我要留言</a></td>
                  </tr>
                </table>


            </td>
          </tr>
      </table>
      <table width="209" height="16" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="images/imgbyj/ab4.gif" width="209" height="16" /></td>
        </tr>
      </table></td>
    <td width="22" valign="top"></td>
    <td width="747" valign="top"><table width="747" height="28" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="69" class="ab4" style="padding-top:5px;">查看留言</td>
        <td width="113"><img src="images/imgbyj/ab5.gif" width="89" height="28" /></td>
        <td width="404" align="right"><img src="images/imgbyj/ab6.gif" width="45" height="28" /></td>
        <td width="161" class="ab5" style="padding-top:5px;">&gt;在线留言 &gt; 查看留言</td>
      </tr>
    </table>
        <table width="740" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#D0D0C5">
          <tr>
            <td height="1"></td>
          </tr>
        </table>
      <table width="723" height="264" border="0" align="center" cellpadding="0" cellspacing="0" style=" margin-top:41px; margin-left:12px; margin-right:12px;">
          <tr>
            <td valign="top" class="aboutus">

                                    <br>
                               <%
          
                               	FeedbackDaoImpl feedbackDaoImpl=new FeedbackDaoImpl();
                               	List<Feedback> feedbacks=feedbackDaoImpl.getFeedbackAll();
                               	
                               	                     	 int currentPage=1;
				if(request.getParameter("pageNo")!=null){
					currentPage=Integer.parseInt(request.getParameter("pageNo"));
				}   		
				Page page2=new Page(5,feedbacks.size(),currentPage);
				currentPage=page2.getCurrentPage();
				
                               	
                               	int t;
                               	if(feedbacks!=null&&feedbacks.size()>0)
                               for(t=page2.getFromIndex();t<page2.getToIndex();t++){
                               			Feedback feedback=feedbacks.get(t);
                                %>
                                    
                                    <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E3E3E3" >
                                      <tr bgcolor="#E8E8E8">
                                        <td width="17%" height="40" align="right" bgcolor="#FFFFFF" > 主　题： </td>
                                        <td colspan="5" bgcolor="#FFFFFF">&nbsp;
                                            <%=feedback.getTheme() %></td>
                                      </tr>
                                      <tr bgcolor="#DFDFDF">
                                        <td height="40" align="right" bgcolor="#FFFFFF" > 反馈内容： </td>
                                        <td colspan="5" align="center" bgcolor="#FFFFFF" ><table width="97%"  border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                              <td height="40" ><%=feedback.getContent() %> </td>
                                            </tr>
                                        </table></td>
                                      </tr>
                                      <tr bgcolor="#EFEFEF">
                                        <td height="40" align="right" bgcolor="#FFFFFF" > 留言者： </td>
                                        <td width="22%" bgcolor="#FFFFFF" ><%=feedback.getContact() %></td>
                                        <td width="12%" align="right" bgcolor="#FFFFFF" >留言时间：</td>
                                        <td width="17%" bgcolor="#FFFFFF" ><%=new SimpleDateFormat("yyyy-MM-dd").format(feedback.getBtime())%></td>
                                        <td width="12%" align="right" bgcolor="#FFFFFF" >回复时间：</td>
                                        <td width="20%" bgcolor="#FFFFFF" > <%if(feedback.getFeedback()!=null&&feedback.getFeedback()!=""){ %><%=new SimpleDateFormat("yyyy-MM-dd").format(feedback.getFtime())%><%} %></td>
                                      </tr>
                                      <tr bgcolor="#DFDFDF">
                                        <td height="40" align="right" bgcolor="#FFFFFF" > <span style="color: #00A8E7">管理员回复：</span> </td>
                                        <td colspan="5" align="center" bgcolor="#FFFFFF" ><table width="97%"  border="0" cellpadding="0" cellspacing="0" >
                                            <tr>
                                              <td height="4"></td>
                                            </tr>
                                            <tr>
                                              <td height="40" >    <%=feedback.getFeedback()!=null?feedback.getFeedback():"" %>                                          </td>
                                            </tr>
                                            <tr>
                                              <td height="4"></td>
                                            </tr>
                                        </table></td>
                                      </tr>
                                    </table><br/>
                            <%} %>
                                   
                                  
                                      <center>
      
      	<form name="showpages" method="Post" action="FeedbackView.jsp">
      		<table align="center" width="80%"  border="0" cellpadding="0" cellspacing="0">
      		<tbody>
    
      			<tr><td align="center">共 <b><%=feedbacks.size() %></b> 条记录&nbsp;&nbsp;<a href="FeedbackView.jsp?pageNo=1">首页</a><a href="FeedbackView.jsp?pageNo=<%=currentPage-1%>"> 上一页</a>&nbsp;<a href="FeedbackView.jsp?pageNo=<%=currentPage+1%>">下一页<a href="FeedbackView.jsp?pageNo=<%=page2.getPageCount()%>">&nbsp;尾页</a> &nbsp;页次：<strong><font color="red"><%=currentPage %></font>/<%=page2.getPageCount() %></strong>页 &nbsp;<b>5</b>条记录/页&nbsp;转到：
      			<select name="pageNo" size="1" onchange="javascript:submit()">
      			<%
      				int j;
      				for(j=1;j<=page2.getPageCount();j++){ %>
      				<option value="<%=j%>" <%if(j==currentPage){%> <%{%>selected='selected'<%}}%>>第<%=j%>页</option>
      				<%}%>
      			</select></td></tr></tbody></table>
      	</form>
      		
      			</center>
                                  
			</td>
          </tr>
      </table></td>
  </tr>
</table>

<%@ include file="foot.jsp" %>
